package com.oa.service.impl;

import java.io.InputStream;
import java.util.List;

import javax.annotation.Resource;

import org.jbpm.api.ProcessDefinition;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.oa.dao.LiuChengDingYiDao;
import com.oa.entity.LiuChengDingYi;
import com.oa.service.LiuChengDingYiService;

/**
 * @author FengMengHuo 流程定义 实现类
 */
@Service("liuChengDingYiService")
@Transactional
public class LiuChengDingYiServiceImpl implements LiuChengDingYiService {

	@Resource(name="liuChengDingYiDao")
	private LiuChengDingYiDao liuChengDingYiDao;
	
	// 流程定义列表
	public List<ProcessDefinition> findLiuChengDingYiList(){
		return liuChengDingYiDao.findLiuChengDingYiList();
	}

	// 部署流程定义
	public void buShuLiuChengDingYi(LiuChengDingYi liuChengDingYi) {
		liuChengDingYiDao.buShuLiuChengDingYi(liuChengDingYi);
	}

	//删除流程定义
	public void deleteLiuChengDingYi(LiuChengDingYi liuChengDingYi) {
		liuChengDingYiDao.deleteLiuChengDingYi(liuChengDingYi);
	}

	// 根据ID查询图片
	public InputStream lookImageById(LiuChengDingYi liuChengDingYi) {
		return liuChengDingYiDao.lookImageById(liuChengDingYi);
	}

}
